import 'package:flutter/material.dart';

import 'package:get/get.dart';

import 'guide_controller.dart';
import 'widgets/content_card.dart';
import 'widgets/gooey_carousel.dart';

class GuideView extends GetView<GuideController> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: GetBuilder<GuideController>(builder: (_) {
        return GooeyCarousel(
          current: _.current,
          onChange: _.setCurrent,
          children: generatedCard(_.setCurrent),
        );
      }),
    );
  }

  List<Widget> generatedCard(void Function(int) onChange) {
    return [
      ContentCard(
        current: 0,
        onChange: onChange,
        color: 'Red',
        altColor: Color(0xFF4259B2),
        title: "Wake up gently \nwith sounds of nature",
        subtitle:
            'Relax your mind and create inner peace with soothing sounds of nature.',
      ),
      ContentCard(
        current: 1,
        onChange: onChange,
        color: 'Yellow',
        altColor: Color(0xFF904E93),
        title: "Clear your mind \nwith breathing exercises",
        subtitle:
            'Melt your stresses and anxieties away with 50+ breathing exercises.',
      ),
      ContentCard(
        current: 2,
        onChange: onChange,
        color: 'Blue',
        altColor: Color(0xFFFFB138),
        title: "Fall asleep \nwith bedtime stories",
        subtitle:
            'Enjoy a restful night’s sleep with relaxing activities and calm bedtime stories.',
      ),
    ];
  }

  /* End */
}
